home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / 3D / POV-Ray 3.0B5a PPC / POV-Ray 3.0B5a / POVSCN.Scenes / POVSCN / LEVEL2 / POLYWOOD.POV < prev    next >
Text File  |  1995-11-08  |  3KB  |  107 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // PolyWood.pov - Wooden polyhedron hollowed by a sphere
  3. // on a grassy hilly lawn.  Shows how easy it is to
  4. // create interesting shapes with CSG operations
  5. // and simple primitive shapes.
  6. // File by Eduard [esp] Schwan
  7.  
  8. #version 3.0
  9. global_settings { assumed_gamma 1.0 }
  10.  
  11. include "shapes.inc"
  12. include "colors.inc"
  13. include "textures.inc"
  14.  
  15. // Moi
  16. camera {
  17.    location   <-3.3,  0.8, -11.0>
  18.    direction  <0.0,   0.0,   1.0>
  19.    up         <0.0,   1.0,   0.0>
  20.    right      <4/3,   0.0,   0.0>
  21.    look_at    <0,     0,     0>
  22. }
  23.  
  24. // Some Light just above the horizon for a long shadow
  25. light_source
  26. {
  27.   <30, 6, -40>
  28.   color White
  29. }
  30.  
  31.  
  32. // The Cloudy Blue Sky
  33. sphere
  34. {
  35.   <0, 0, 0>, 10000
  36.   pigment
  37.   {
  38.      Bright_Blue_Sky
  39.      scale <4000, 600, 1000>
  40.   }
  41. }
  42.  
  43.  
  44. // The Hilly Grassy Land
  45. plane
  46. {
  47.   y, -4.1
  48.   pigment { color red 0.2 green 1.0 blue 0.4 }
  49.   finish
  50.   {
  51.       crand 0.025 // a little randomness to hide the rather severe color banding
  52.       ambient 0.1
  53.       diffuse 0.7
  54.       roughness 1
  55.    }
  56.    normal { bumps 0.5  scale 10 }
  57. }
  58.  
  59.  
  60. // The Wooden Polyhedron
  61. // The idea here is to take a few cubes rotated at 45 degrees
  62. // along different axes from each other and intersect them,
  63. // thus cutting some corners.  Then we carve out the center
  64. // with a slightly oversized sphere, which protrudes slightly
  65. // through the sides of the cubes, cutting portholes in the
  66. // facets of the polyhedron.  Then we get out the wooden paint..
  67. intersection {
  68.    // polyhedron
  69.    // Add small amount to each box to account for normal numerical inacurracies.
  70.    // This fixes surface acne on coplanar surfaces.
  71.    box { <-4.000, -4.000, -4.000>, <4.000, 4.000, 4.000> }
  72.    box { <-4.001, -4.001, -4.001>, <4.001, 4.001, 4.001>   rotate 45*x }
  73.    box { <-4.002, -4.002, -4.002>, <4.002, 4.002, 4.002>   rotate 45*y }
  74.    box { <-4.003, -4.003, -4.003>, <4.003, 4.003, 4.003>   rotate 45*z }
  75.    // hollow it out
  76.    sphere { <0, 0, 0>, 4.25 inverse }
  77.  
  78.    // semi-dark wood with dark greenish rings
  79.    pigment {
  80.       wood
  81.       turbulence 0.04
  82.       colour_map {
  83.         [0.0 0.4  color red 0.8 green 0.4 blue 0.2
  84.                   color red 0.8 green 0.4 blue 0.1]
  85.         [0.4 0.5  color red 0.1 green 0.3 blue 0.1
  86.                   color red 0.1 green 0.3 blue 0.2]
  87.         [0.5 0.8  color red 0.1 green 0.3 blue 0.2
  88.                   color red 0.8 green 0.4 blue 0.1]
  89.         [0.8 1.0  color red 0.8 green 0.4 blue 0.1
  90.                   color red 0.8 green 0.4 blue 0.2]
  91.       }
  92.       scale <0.2, 0.2, 1>
  93.       rotate <45, 0, 5>
  94.       translate <2, 2, -4>
  95.    }
  96.    finish {
  97.       // make it look wood-like
  98.       ambient 0.15
  99.       diffuse 0.6
  100.       // make it a little bit shiny
  101.       specular 0.3 roughness 0.01
  102.       phong 0.3 phong_size 60
  103.    }
  104. }
  105.  
  106. // ttfn!
  107.